home *** CD-ROM | disk | FTP | other *** search
/ Immoral Angel 1 / Immoral Angel 1.iso / pc / program / play.dxr / 00183.ls < prev    next >
Encoding:
Text File  |  1997-07-11  |  3.1 KB  |  127 lines

  1. on startMovie
  2.   global poponoff, whichview, status, startTime, qtstatus, photonum, photonummax, selectedvideonum, fileName, cursorwait
  3.   cursor(cursorwait)
  4.   set poponoff to 0
  5.   set whichview to "info"
  6.   set status to EMPTY
  7.   set startTime to ticks()
  8.   set selectedvideonum to 0
  9.   set qtstatus to "QToff"
  10.   set fileName to "PLAY"
  11. end
  12.  
  13. on button
  14.   global status, bgmonoff
  15.   if status <> EMPTY then
  16.     beepsound()
  17.     return 0
  18.   end if
  19.   set buttonname to item 1 of the name of cast the castNum of sprite clickOn()
  20.   repeat while stillDown()
  21.     if rollOver(clickOn()) then
  22.       set the castNum of sprite clickOn() to the number of member (buttonname & ",down")
  23.     else
  24.       set the castNum of sprite clickOn() to the number of member (buttonname & ",up")
  25.     end if
  26.     updateStage()
  27.   end repeat
  28.   set the castNum of sprite clickOn() to the number of member (buttonname & ",up")
  29.   updateStage()
  30.   if rollOver(clickOn()) then
  31.     puppetSound(bgmonoff)
  32.     updateStage()
  33.     return 1
  34.   else
  35.     return 0
  36.   end if
  37. end
  38.  
  39. on button2
  40.   global bgmonoff
  41.   set buttonname to item 1 of the name of cast the castNum of sprite clickOn()
  42.   repeat while stillDown()
  43.     if rollOver(clickOn()) then
  44.       set the castNum of sprite clickOn() to the number of member (buttonname & ",down")
  45.     else
  46.       set the castNum of sprite clickOn() to the number of member (buttonname & ",up")
  47.     end if
  48.     updateStage()
  49.   end repeat
  50.   set the castNum of sprite clickOn() to the number of member (buttonname & ",up")
  51.   updateStage()
  52.   if rollOver(clickOn()) then
  53.     puppetSound(bgmonoff)
  54.     updateStage()
  55.     return 1
  56.   else
  57.     return 0
  58.   end if
  59. end
  60.  
  61. on npbutton
  62.   global status, bgmonoff
  63.   if status <> EMPTY then
  64.     beepsound()
  65.     return 0
  66.   end if
  67.   set spcenter to (the right of sprite clickOn() - the left of sprite clickOn()) / 2
  68.   set which to "0,0"
  69.   set x to 0
  70.   repeat while stillDown()
  71.     if rollOver(clickOn()) then
  72.       set mh to mouseH() - the left of sprite clickOn()
  73.       if mh < spcenter then
  74.         set the castNum of sprite clickOn() to the number of member "prevDown"
  75.         set x to -1
  76.       else
  77.         if mh > spcenter then
  78.           set the castNum of sprite clickOn() to the number of member "nextDown"
  79.           set x to 1
  80.         end if
  81.       end if
  82.     else
  83.       set the castNum of sprite clickOn() to the number of member "nextPrev,up"
  84.     end if
  85.     updateStage()
  86.   end repeat
  87.   set the castNum of sprite clickOn() to the number of member "nextPrev,up"
  88.   updateStage()
  89.   if rollOver(clickOn()) then
  90.     set which to "1," & x
  91.     puppetSound(bgmonoff)
  92.     updateStage()
  93.     return which
  94.   else
  95.     set which to "0," & x
  96.     return which
  97.   end if
  98. end
  99.  
  100. on beepsound
  101.   global bgmonoff, beepnum
  102.   puppetSound(string(beepnum))
  103.   updateStage()
  104. end
  105.  
  106. on wait t
  107.   set waittime to ticks() + (t * 60)
  108.   repeat while ticks() < waittime
  109.     nothing()
  110.   end repeat
  111. end
  112.  
  113. on idle
  114.   global startTime, fileName
  115.   checktimeout()
  116.   if fileName = "MAIN" then
  117.     exit
  118.   end if
  119.   set runningtime to ticks() - startTime
  120.   if runningtime > (7 * 60 * 60) then
  121.     set startTime to ticks()
  122.     if random(5) = 2 then
  123.       bomb()
  124.     end if
  125.   end if
  126. end
  127.